﻿<ss:AppView x:Class="SmartSpace.UI.Silverlight.Dynamic.DetailTemplateView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  
    xmlns:ss="clr-namespace:SmartSpace.UI.Silverlight;assembly=SmartSpace.UI.Silverlight"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <toolkit:BusyIndicator Name="m_busy">
        <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Border Grid.Row="0" BorderThickness="0,0,0,1">
                <ss:SlToolbar>
                    <StackPanel Orientation="Horizontal" Name="m_operatePanel">
                        <TextBlock Text="选择流转环节:" VerticalAlignment="Center" Margin="5,0,0,0"/>
                        <ComboBox Name="_ctlListOperate" MinWidth="100"  Margin="5,5,0,5">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Caption}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>
                        <Button Name="_ctlBtnSubmit" Click="_ctlBtnSubmit_Click" Margin="5,5,0,5">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                <Image Source="./Resources/Send.png" Margin="0,0,3,0"/>
                                <TextBlock Text="提交" VerticalAlignment="Center"/>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <Button Name="_ctlBtnSave" Click="_ctlBtnSave_Click" Margin="5,5,0,5">
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <Image Source="./Resources/save.png" Margin="0,0,3,0"/>
                            <TextBlock Text="保存" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Button>
                    <Button Name="_ctlBtnDelete" Click="_ctlBtnDelete_Click" Visibility="{Binding Path=Visibility,ElementName=_ctlSubmit}" Margin="5,5,0,5">
                        <StackPanel Orientation="Horizontal">
                            <Image Source="./Resources/Delete.png" Margin="0,0,3,0"/>
                            <TextBlock Text="删除" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Button>
                    <StackPanel Name="m_btnOperateContainer" Orientation="Horizontal">
                    </StackPanel>
                    <StackPanel Name="_ctlDocContainer">
                    </StackPanel>
                    <Button Name="_ctlBtnCancel" Click="_ctlBtnCancel_Click" Margin="5,5,0,5">
                        <StackPanel Orientation="Horizontal">
                            <Image Source="./Resources/Cancel.png" Margin="0,0,3,0"/>
                            <TextBlock Text="返回" VerticalAlignment="Center"/>
                        </StackPanel>
                    </Button>
                </ss:SlToolbar>
            </Border>
            <Border Grid.Row="1">
                <sdk:TabControl Name="m_tabControl" Margin="5" Padding="0">
                    <sdk:TabControl.Items>
                        <sdk:TabItem Name="m_ctlTabDefault" Header="实体记录">
                            <ScrollViewer Margin="0" Padding="0" VerticalScrollBarVisibility="Auto">
                                <StackPanel>
                                    <StackPanel x:Name="m_detailView"/>
                                    <StackPanel Name="m_inlineContainer" />
                                </StackPanel>
                            </ScrollViewer>
                        </sdk:TabItem>
                    </sdk:TabControl.Items>
                </sdk:TabControl>
            </Border>
        </Grid>
    </toolkit:BusyIndicator>
</ss:AppView>
